<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT">





  <link rel="alternate" href="/atom.xml" title="枫易录" type="application/atom+xml">






<meta name="description" content="改变从今天开始~~~">
<meta property="og:type" content="website">
<meta property="og:title" content="枫易录">
<meta property="og:url" content="http://xinglinsky.github.io/index.html">
<meta property="og:site_name" content="枫易录">
<meta property="og:description" content="改变从今天开始~~~">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="枫易录">
<meta name="twitter:description" content="改变从今天开始~~~">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://xinglinsky.github.io/">





  <title>枫易录</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left 
  page-home">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">枫易录</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">Journey of a thousand miles begins with a single step.</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://xinglinsky.github.io/2019/12/03/vim-basic/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="xinglinsky">
      <meta itemprop="description" content>
      <meta itemprop="image" content="https://raw.githubusercontent.com/youngzhaojia/youngzhaojia.github.io/master/photo/avatar/young.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="枫易录">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2019/12/03/vim-basic/" itemprop="url">Untitled</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2019-12-03T17:41:12+08:00">
                2019-12-03
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            
          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://xinglinsky.github.io/2019/12/03/python-ctypes/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="xinglinsky">
      <meta itemprop="description" content>
      <meta itemprop="image" content="https://raw.githubusercontent.com/youngzhaojia/youngzhaojia.github.io/master/photo/avatar/young.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="枫易录">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2019/12/03/python-ctypes/" itemprop="url">从枚举Windows系统进程看python ctypes与C的Win32混和编程</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2019-12-03T14:16:23+08:00">
                2019-12-03
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/programming/" itemprop="url" rel="index">
                    <span itemprop="name">编程</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p><strong>环境：</strong>python2.7</p>
<p>下面是枚举Windows所有进程，根据已知进程名获取进程信息（pid）的实例。</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">getPidByName</span><span class="params">(processName)</span>:</span></span><br><span class="line">    ret = []</span><br><span class="line">    aProcesses = (wintypes.DWORD * <span class="number">1024</span>)()</span><br><span class="line">    cbNeeded = wintypes.DWORD(<span class="number">0</span>)</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> <span class="keyword">not</span> ctypes.windll.psapi.EnumProcesses(aProcesses, ctypes.sizeof(aProcesses), ctypes.byref(cbNeeded)):</span><br><span class="line">        <span class="keyword">return</span> ret</span><br><span class="line"></span><br><span class="line">    cProcesses = cbNeeded.value / ctypes.sizeof(wintypes.DWORD)</span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> range(cProcesses):</span><br><span class="line">        <span class="keyword">if</span> aProcesses[i] != <span class="number">0</span>:</span><br><span class="line">            szProcessName = ctypes.create_unicode_buffer(ctypes.sizeof(wintypes.WCHAR) * wintypes.MAX_PATH)</span><br><span class="line">            hProcess = ctypes.windll.kernel32.OpenProcess(<span class="number">0x0400</span> | <span class="number">0x0010</span>, <span class="literal">False</span>, aProcesses[i])</span><br><span class="line">            <span class="keyword">if</span> hProcess != <span class="literal">None</span>:</span><br><span class="line">                ctypes.windll.psapi.GetModuleBaseNameW(hProcess, <span class="literal">None</span>, szProcessName, ctypes.sizeof(szProcessName) / ctypes.sizeof(wintypes.WCHAR))</span><br><span class="line">                <span class="keyword">if</span> str(szProcessName.value) == processName:</span><br><span class="line">                    ret.append(int(aProcesses[i]))</span><br><span class="line">            ctypes.windll.kernel32.CloseHandle(hProcess)</span><br><span class="line">    <span class="keyword">return</span> ret</span><br></pre></td></tr></table></figure>

<h4 id="基本数据类型"><a href="#基本数据类型" class="headerlink" title="基本数据类型"></a>基本数据类型</h4><p>了解一种编程语言的数据类型是通往这条编程大道的基本入门法则，下面是ctypes中python与C对应类型表：<br>|ctypes type|C type|Python type|<br>| :———| :—-| :———|<br>| c_bool | _Bool | bool (1) |<br>| c_char | char  | 1-character string |<br>| c_wchar | wchar_t | 1-character unicode string |<br>| c_byte | char | int/long |<br>| c_ubyte | unsigned char | int/long |<br>| c_short | short | int/long |<br>| c_ushort | unsigned short | int/long |<br>| c_int | int | int/long |<br>| c_uint | unsigned int | int/long |<br>| c_long | long | int/long |<br>| c_ulong | unsigned long | int/long |<br>| c_longlong | __int64 or long long | int/long |<br>| c_ulonglong | unsigned __int64 or unsigned long long | int/long |<br>| c_float | float | float |<br>| c_double | double | float |<br>| c_longdouble | long double | float |<br>| c_char_p | char * (NUL terminated) | string or None |<br>| c_wchar_p | wchar_t * (NUL terminated) | unicode or None |<br>| c_void_p | void * | int/long or None |</p>
<p>先简单看下基本类型说明：</p>
<ol>
<li><p>初始化及构造<br>基本类型都可以通过类似于C构造函数的方式来声明和初始化。<br>比如要声明一个c_bool, <code>cb = c_bool(True)</code></p>
</li>
<li><p><code>None</code> 对应C中的 <code>NULL</code>。<br>NULL在win32编程中经常用到，所以这一条还是很有用的。实际上，用0也能表示，毕竟在Windows中NULL是0用宏来实现的。</p>
</li>
<li><p>c_char_p、 c_wchar_p、 c_void_p 构建出的指针，其内容是不可变的，赋新值时实际上是指向了新地址。官方的例子很生动，引用下：</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&gt;&gt;&gt; </span>s = <span class="string">"Hello, World"</span></span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>c_s = c_char_p(s)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">print</span> c_s</span><br><span class="line">c_char_p(<span class="string">'Hello, World'</span>)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>c_s.value = <span class="string">"Hi, there"</span></span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">print</span> c_s</span><br><span class="line">c_char_p(<span class="string">'Hi, there'</span>)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">print</span> s                 <span class="comment"># first string is unchanged</span></span><br><span class="line">Hello, World</span><br><span class="line">&gt;&gt;&gt;</span><br></pre></td></tr></table></figure>

</li>
</ol>
<p>可以看出s最终是没有被修改的。也证实了一点，Python中string类型是不可变(immutable)的。</p>
<ol start="4">
<li>创建可变的string buffer。<br>Win32编程中经常要用到字符数组。比如传递空的字符数组到某API中，获取信息并保存到数组中。那么这里肯定需要可变的string buffer了。<br>ctypes中可使用<code>create_string_buffer()</code>和<code>create_unicode_buffer()</code>两个方法。<br>其中，<code>create_string_buffer()</code>生成c_char类型的字符数组，而<code>create_unicode_buffer()</code>生成c_wchar类型的。</li>
</ol>
<h5 id="普通数组"><a href="#普通数组" class="headerlink" title="普通数组"></a>普通数组</h5><p>沿用最上面的枚举进程的代码，这个进程id数组声明如下：<br><code>aProcesses = (wintypes.DWORD * 1024)()</code><br>可以看出，基本格式是： <code>(类型 * 大小)()</code><br>数组可以直接作为指针传递</p>
<h4 id="指针与引用"><a href="#指针与引用" class="headerlink" title="指针与引用"></a>指针与引用</h4><p>Python ctypes中<br><em>指针：</em> <code>pointer()</code><br><em>引用：</em> <code>byref()</code><br>指针相当于C中的左值, 本身可以被修改，被操作（取地址）： </p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">from</span> ctypes <span class="keyword">import</span> *</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>n = c_int(<span class="number">0</span>)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>p = pointer(n)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>p1 = POINTER(c_int)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>pp = byref(p)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>type(pp)</span><br><span class="line">&lt;type <span class="string">'CArgObject'</span>&gt;</span><br></pre></td></tr></table></figure>

<p><strong>注意：</strong><code>pointer(t)</code>相当于<code>POINTER(type(t))</code>, 也就是说可以用<code>POINTER()</code>来生成（可以理解为注册）新指针类型。</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">from</span> ctypes <span class="keyword">import</span> *</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>new_p_type = POINTER(c_int * <span class="number">10</span>)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>type(new_p_type)</span><br><span class="line">&lt;type <span class="string">'_ctypes.PyCPointerType'</span>&gt;</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>n = new_p_type((c_int * <span class="number">10</span>)(<span class="number">0</span>))</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>type(n)</span><br><span class="line">&lt;<span class="class"><span class="keyword">class</span> '<span class="title">__main__</span>.<span class="title">LP_c_long_Array_10</span>'&gt;</span></span><br><span class="line">&gt;&gt;&gt; new_p1_type = POINTER(c_int)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>type(new_p1_type)</span><br><span class="line">&lt;type <span class="string">'_ctypes.PyCPointerType'</span>&gt;</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>n1 = new_p1_type(c_int(<span class="number">0</span>))</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>type(n1)</span><br><span class="line">&lt;<span class="class"><span class="keyword">class</span> '<span class="title">__main__</span>.<span class="title">LP_c_long</span>'&gt;</span></span><br><span class="line"><span class="class">```  </span></span><br><span class="line"><span class="class">而引用相当于<span class="title">C</span>中的右值，本身没有被分配空间：  </span></span><br><span class="line"><span class="class">```<span class="title">python</span></span></span><br><span class="line"><span class="class">&gt;&gt;&gt; <span class="title">from</span> <span class="title">ctypes</span> <span class="title">import</span> *</span></span><br><span class="line">&gt;&gt;&gt; n = c_int(0)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>f = byref(n)</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>ff = byref(f)</span><br><span class="line">Traceback (most recent call last):</span><br><span class="line">  File <span class="string">"&lt;input&gt;"</span>, line <span class="number">1</span>, <span class="keyword">in</span> &lt;module&gt;</span><br><span class="line">TypeError: byref() argument must be a ctypes instance, <span class="keyword">not</span> <span class="string">'CArgObject'</span></span><br></pre></td></tr></table></figure>

<p>在Win32编程中，一般有两种情况需要用到ctypes的指针和引用。<br>一种是普通的一维指针传递，这时使用<code>byref()</code>即可。还一种是多维指针，这里就需要用到<code>pointer()</code>构建指针对象，最后使用<code>byref()</code>传递。<br>例如<code>**T</code>这种二维指针。</p>
<h4 id="类型转换"><a href="#类型转换" class="headerlink" title="类型转换"></a>类型转换</h4><p>使用<code>cast()</code>来进行类型转换（强转）。<br>例如：</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&gt;&gt;&gt; </span><span class="keyword">from</span> ctypes <span class="keyword">import</span> *</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>n = pointer(c_ubyte(<span class="number">1</span>))</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>n1 = cast(n, POINTER(c_uint))</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>n</span><br><span class="line">&lt;__main__.LP_c_ubyte object at <span class="number">0x05D866C0</span>&gt;</span><br><span class="line"><span class="meta">&gt;&gt;&gt; </span>n1</span><br><span class="line">&lt;__main__.LP_c_ulong object at <span class="number">0x053A5850</span>&gt;</span><br></pre></td></tr></table></figure>

<h4 id="DLL加载"><a href="#DLL加载" class="headerlink" title="DLL加载"></a>DLL加载</h4><p>说到Win32编程，肯定是需要调用各种DLL的，比如系统库，C运行库等。<br>用法比较简单，两种方式：</p>
<ol>
<li><code>ctypes.LibraryLoader.LoadLibrary(dllname)</code><br>调用该dll的方法较多时，可先保存module再直接使用变量调用。<em>自定义dll使用此方式，dllname即为dll路径</em></li>
<li><code>ctypes.LibraryLoader.dllname</code><br>在调用方法较少的情况下使用比较方便。</li>
</ol>
<p><strong>注意：</strong>如果dll不存在，C/C++下加载dll可以判断句柄是否为空，但这里两种方式都会抛异常。可以使用<code>find_library(name)</code>先查找，如果存在时再加载。</p>
<h4 id="回调函数"><a href="#回调函数" class="headerlink" title="回调函数"></a>回调函数</h4><p>回调机制在Win32编程中十分重要，很多API都需要传入一个回调函数作为参数。<br>在ctypes中，有几种声明回调函数的方式。我们来看看它们有什么区别。</p>
<ol>
<li><code>CFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)</code><br>一般C回调函数，<code>__stdcall</code>的调用方式。</li>
<li><code>WINFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)</code><br>Window API专用回调函数，和C中<code>WINAPI</code>这个宏有异曲同工之妙。自然是<code>__cdecl</code>的调用方式了。</li>
<li><code>PYFUNCTYPE(restype, *argtypes)</code><br>Python回调函数，混和编程中较少使用。  </li>
</ol>
<p><strong>扩展：</strong><code>__cdecl</code>和<code>__stdcall</code>有什么区别呢？</p>
<blockquote>
<p>__stdcall：参数由右向左压入堆栈；堆栈由函数本身清理。<br><br>__cdecl：参数也是由右向左压入堆栈；但堆栈由调用者清理。<br><br>两者在同一名字修饰约定下，编译过后变量和函数的名字也不一样。<br></p>
</blockquote>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://xinglinsky.github.io/2019/09/03/env-install/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="xinglinsky">
      <meta itemprop="description" content>
      <meta itemprop="image" content="https://raw.githubusercontent.com/youngzhaojia/youngzhaojia.github.io/master/photo/avatar/young.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="枫易录">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2019/09/03/env-install/" itemprop="url">Window下开发环境安装教程</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2019-09-03T10:07:49+08:00">
                2019-09-03
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/programming/" itemprop="url" rel="index">
                    <span itemprop="name">编程</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h2 id="Window包管理工具Chocolatey安装"><a href="#Window包管理工具Chocolatey安装" class="headerlink" title="Window包管理工具Chocolatey安装"></a>Window包管理工具Chocolatey安装</h2><p>一个能让你在Window下体验Linux apt/yum类似一键安装开发环境的包管理器。<br><a href="https://chocolatey.org/" target="_blank" rel="noopener">官网地址 https://chocolatey.org/</a></p>
<h3 id="安装要求"><a href="#安装要求" class="headerlink" title="安装要求"></a>安装要求</h3><ul>
<li>Windows 7+ / Windows Server 2003+</li>
<li>PowerShell v2+ (Not PowerShell Core yet though)</li>
<li>.NET Framework 4+ (the installation will attempt to install .NET 4.0 if you do not have it installed)</li>
</ul>
<h3 id="使用cmd-exe安装"><a href="#使用cmd-exe安装" class="headerlink" title="使用cmd.exe安装"></a>使用cmd.exe安装</h3><figure class="highlight cmd"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">@"<span class="variable">%SystemRoot%</span>\System32\WindowsPowerShell\v1.<span class="number">0</span>\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.<span class="built_in">Net</span>.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" &amp;&amp; <span class="built_in">SET</span> "<span class="built_in">PATH</span>=<span class="variable">%PATH%</span>;<span class="variable">%ALLUSERSPROFILE%</span>\chocolatey\bin"</span><br></pre></td></tr></table></figure>

<h3 id="使用PowerShell-exe安装"><a href="#使用PowerShell-exe安装" class="headerlink" title="使用PowerShell.exe安装"></a>使用PowerShell.exe安装</h3><figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">Set-ExecutionPolicy</span> Bypass -Scope <span class="keyword">Process</span> -Force; iex ((<span class="built_in">New-Object</span> System.Net.WebClient).DownloadString(<span class="string">'https://chocolatey.org/install.ps1'</span>))</span><br></pre></td></tr></table></figure>

<h3 id="运行"><a href="#运行" class="headerlink" title="运行"></a>运行</h3><p><code>choco</code><br>查看帮助来获取更多信息，基本命令： search, install, upgrade, uninstall<br>比如，安装svn</p>
<ol>
<li><p>以管理员身份运行命令行并输入：<code>choco search svn</code></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">&gt; choco search svn</span><br><span class="line">Chocolatey v0.10.15</span><br><span class="line">svn 1.8.17 [Approved] Downloads cached for licensed users</span><br><span class="line">tortoisesvn 1.12.2.28653 [Approved]</span><br></pre></td></tr></table></figure>
</li>
<li><p>选择安装tortoisesvn, <code>choco install tortoisesvn -y</code></p>
</li>
</ol>
<h3 id="更新Chocolatey"><a href="#更新Chocolatey" class="headerlink" title="更新Chocolatey"></a>更新Chocolatey</h3><p><code>choco upgrade chocolatey</code></p>
<h3 id="查看过期并更新"><a href="#查看过期并更新" class="headerlink" title="查看过期并更新"></a>查看过期并更新</h3><p><code>choco outdated</code>  </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">λ choco outdated</span><br><span class="line">Chocolatey v0.10.15</span><br><span class="line">Outdated Packages</span><br><span class="line"> Output is package name | current version | available version | pinned?</span><br><span class="line"></span><br><span class="line">python3|3.7.3|3.7.4|false</span><br><span class="line"></span><br><span class="line">Chocolatey has determined 1 package(s) are outdated.</span><br></pre></td></tr></table></figure>
          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://xinglinsky.github.io/2019/08/29/windows-install-sdk71/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="xinglinsky">
      <meta itemprop="description" content>
      <meta itemprop="image" content="https://raw.githubusercontent.com/youngzhaojia/youngzhaojia.github.io/master/photo/avatar/young.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="枫易录">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2019/08/29/windows-install-sdk71/" itemprop="url">Windows安装SDK7.1</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2019-08-29T19:46:16+08:00">
                2019-08-29
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/programming/" itemprop="url" rel="index">
                    <span itemprop="name">编程</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>Win10安装会比较麻烦，下面会特殊说明。</p>
<h3 id="卸载"><a href="#卸载" class="headerlink" title="卸载"></a>卸载</h3><p>如果本地上有安装过VS2010的话，或者安装失败时，很有可能是因为运行库的版本问题。需要卸载相关组件。  </p>
<ul>
<li><p>Visual c++ 2010 x86 redistributable</p>
</li>
<li><p>Visual c++ 2010 x64 redistributable（64位windows）<br>也可以直接通过命令行来卸载（没有安装的话会提示不存在）：  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">msiexec /x &#123;2F8B731A-5F2D-3EA8-8B25-C3E5E43F4BDB&#125;</span><br><span class="line">msiexec /x &#123;81455DEB-FC7E-3EE5-85CA-2EBDD9FD61EB&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>Microsoft Visual C++ Compilers 2010 X86和X64版本<br>需要在注册表中查找是否存在，路径为HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall，<br>查找Display name为“Microsoft Visual C++ Compilers 2010 Standard-enu-x86”和“Microsoft Visual C++ Compilers 2010 Standard-enu-x64”，然后卸载。</p>
</li>
</ul>
<h3 id="下载、运行安装SDK7-1程序"><a href="#下载、运行安装SDK7-1程序" class="headerlink" title="下载、运行安装SDK7.1程序"></a>下载、运行安装SDK7.1程序</h3><p><a href="https://www.microsoft.com/en-us/download/details.aspx?id=17851" target="_blank" rel="noopener">.NET 4.0下载地址</a><br>如果本地已安装.NET4.0，可以不用安装。如果本机没有安装VS2010而且有编译的需求，那下载任意版本安装下。<br><a href="https://www.microsoft.com/en-us/download/details.aspx?id=8279" target="_blank" rel="noopener">SDK7.1下载地址</a><br>如果已安装.NET4.0，可能会提示.NET版本问题，直接忽略。<br><strong>Win10注意事项</strong></p>
<ol>
<li>下载操作系统对应版本的ISO文件：<br><a href="https://www.microsoft.com/en-us/download/details.aspx?id=8442" target="_blank" rel="noopener">ISO 镜像下载说明</a><br><a href="http://download.microsoft.com/download/F/1/0/F10113F5-B750-4969-A255-274341AC6BCE/GRMSDK_EN_DVD.iso" target="_blank" rel="noopener">ISO 32位下载地址</a><br><a href="http://download.microsoft.com/download/F/1/0/F10113F5-B750-4969-A255-274341AC6BCE/GRMSDKX_EN_DVD.iso" target="_blank" rel="noopener">ISO 64位下载地址</a></li>
<li>直接运行Setup\SDKSetup.exe安装。</li>
</ol>
<h3 id="修复VS2010"><a href="#修复VS2010" class="headerlink" title="修复VS2010"></a>修复VS2010</h3><p>如果有需要的话，可以重新运行VS2010安装程序或者在控制面板-&gt;程序-&gt;VS2010右击修改，选择修复并执行。</p>
<p><strong>不想在Win10下折腾的、折腾了还是失败的童鞋，可以选择直接安装VS2012或者VS2015（单独选择SDK）解决。</strong></p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://xinglinsky.github.io/2017/01/14/encoding/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="xinglinsky">
      <meta itemprop="description" content>
      <meta itemprop="image" content="https://raw.githubusercontent.com/youngzhaojia/youngzhaojia.github.io/master/photo/avatar/young.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="枫易录">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
                
                <a class="post-title-link" href="/2017/01/14/encoding/" itemprop="url">论pyqt 编码的蹊跷——QTextStream、QString、string、unicode相关</a></h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-01-14T14:00:00+08:00">
                2017-01-14
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/programming/" itemprop="url" rel="index">
                    <span itemprop="name">编程</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p><strong>环境：</strong>Pyqt4.8 32位，python2.7.3 32位<br>你是不是每次看到什么字符编码、文件编码和字符串类型，都会有些懵逼呢？反正我有点，以前情况不复杂，这次遇到个坑，特此记录下。</p>
<h4 id="背景："><a href="#背景：" class="headerlink" title="背景："></a>背景：</h4><p>从<strong>qrc</strong>文件中读取某文本文件，然后解析成json，并显示在Qt控件上。该文件以<strong>utf-8</strong>编码，并保存有<strong>中文</strong>，对，就是这个中文的引出的话题,不是中文也就不复杂了……  </p>
<h4 id="分析："><a href="#分析：" class="headerlink" title="分析："></a>分析：</h4><pre><code>1. 从rcc编译的qrc文件中读取文件，也就意味着无法使用python的标准代码：
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">with</span> open(file_path) <span class="keyword">as</span> f:</span><br><span class="line">	content = json.load(f)</span><br><span class="line">	<span class="keyword">print</span> content</span><br></pre></td></tr></table></figure>

别无选择，只能使用QFile。
2. 说到QFile，自然要用到QTextStream了。
3. 再使用python unicode()函数将str对象解码。
4. 最后使用json库loads()方法，解析成json对象。
基本代码是这样的：  
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">read_file</span><span class="params">(path)</span>:</span></span><br><span class="line">	<span class="keyword">try</span>:</span><br><span class="line">		f = QtCore.QFile(path)</span><br><span class="line">		<span class="keyword">if</span> <span class="keyword">not</span> f.open(QtCore.QFile.ReadOnly | QtCore.QFile.Text):</span><br><span class="line">			<span class="keyword">return</span> <span class="string">""</span></span><br><span class="line">		ts = QtCore.QTextStream(f)</span><br><span class="line">		tsData = ts.readAll()</span><br><span class="line">		content = unicode(tsData, <span class="string">"utf-8"</span>, <span class="string">"ignore"</span>)</span><br><span class="line">		<span class="keyword">return</span> json.loads(content)</span><br><span class="line">	<span class="keyword">except</span>:</span><br><span class="line">		<span class="keyword">import</span> traceback</span><br><span class="line">		traceback.print_exc()</span><br><span class="line">	<span class="keyword">finally</span>:</span><br><span class="line">		f.close()</span><br></pre></td></tr></table></figure>

最后发现报错了……
ValueError: Invalid control character at: line 14 column
5. 尝试将tsData先转换为utf-8编码，结果还是报错……
还尝试着直接使用str()等等方法，包括网上的一些技巧，比如：json.loads(content, strict=False)，都失败了……</code></pre><h4 id="解决及总结："><a href="#解决及总结：" class="headerlink" title="解决及总结："></a>解决及总结：</h4><pre><code>1. QTextStream在读取文本文件时，会默认使用Local的字符编码，如果不指定编码，会使后续的处理寸步难行……
后续有个官方链接说明了
For Python v2 the following conversions are done by default.
If Qt expects a char *, signed char * or an unsigned char * (or a const version) then PyQt4 will accept a unicode or QString that contains only ASCII characters, a str, a QByteArray, or a Python object that implements the buffer protocol.
If Qt expects a char, signed char or an unsigned char (or a const version) then PyQt4 will accept the same types as for char *, signed char * and unsigned char * and also require that a single character is provided.
If Qt expects a QString then PyQt4 will accept a unicode, a str that contains only ASCII characters, a QChar or a QByteArray.
If Qt expects a QByteArray then PyQt4 will accept a unicode that contains only Latin-1 characters, or a str
2. Unicode()在不指定encoding参数的情况下，有两种操作。如果字符串是str对象，则会调用str()，也就是使用python默认的ascci编码来解码。如果已经是Unicode对象则不会任何附加操作。
If no optional parameters are given, unicode() will mimic the behaviour of str() except that it returns Unicode strings instead of 8-bit strings. More precisely, if object is a Unicode string or subclass it will return that Unicode string without any additional decoding applied.
所以在这里，我们需要指定utf-8的编码格式，才能转化为unicode对象。
最后代码如下：
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">@contextmanager</span></span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">read_file</span><span class="params">(path)</span>:</span></span><br><span class="line">	<span class="keyword">try</span>:</span><br><span class="line">		f = QtCore.QFile(path)</span><br><span class="line">		<span class="keyword">if</span> f.open(QtCore.QFile.ReadOnly | QtCore.QFile.Text):</span><br><span class="line">			ts = QtCore.QTextStream(f)</span><br><span class="line">			ts.setCodec(<span class="string">"utf-8"</span>)</span><br><span class="line">			tsData = ts.readAll()</span><br><span class="line">			content = unicode(tsData.toUtf8(), <span class="string">"utf-8"</span>, <span class="string">"ignore"</span>)</span><br><span class="line">			<span class="keyword">yield</span> json.loads(content)</span><br><span class="line">		<span class="keyword">else</span>:</span><br><span class="line">			<span class="keyword">yield</span> <span class="string">""</span></span><br><span class="line">	<span class="keyword">except</span>:</span><br><span class="line">		<span class="keyword">import</span> traceback</span><br><span class="line">		traceback.print_exc()</span><br><span class="line">		<span class="keyword">yield</span> <span class="string">""</span></span><br><span class="line">	<span class="keyword">finally</span>:</span><br><span class="line">		f.close()</span><br></pre></td></tr></table></figure></code></pre><p>有个需要注意的地方，如果要gui控件能正常显示中文，<code>content = unicode(tsData.toUtf8(), &quot;utf-8&quot;, &quot;ignore&quot;)</code>中的<strong>toUtf8()</strong>是必不可少，不然会显示为乱码。 </p>
<h4 id="总结："><a href="#总结：" class="headerlink" title="总结："></a>总结：</h4><p>一句话总结：<strong>区分什么是编码，什么是对象，Unicode是中转对象，str-&gt;unicode是解码，unicode-&gt;str是编码。</strong><br>不知在谁的blog上看到的了，很形象，很深刻……谢谢这样仁兄！</p>
<hr>
<p>相关链接：<br><a href="http://pyqt.sourceforge.net/Docs/PyQt4/gotchas.html" target="_blank" rel="noopener">PyQt 4.12 Reference Guide</a></p>

          
        
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </div>
  
  
  
  </article>


    
  </section>

  


          </div>
          


          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="https://raw.githubusercontent.com/youngzhaojia/youngzhaojia.github.io/master/photo/avatar/young.jpg" alt="xinglinsky">
            
              <p class="site-author-name" itemprop="name">xinglinsky</p>
              <p class="site-description motion-element" itemprop="description">改变从今天开始~~~</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">5</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                
                  <span class="site-state-item-count">1</span>
                  <span class="site-state-item-name">categories</span>
                
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                
                  <span class="site-state-item-count">7</span>
                  <span class="site-state-item-name">tags</span>
                
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          

          
          

          
          

          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xinglinsky</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  

  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
